package com.zzl.finance.data.constant;

/**
 * 产品状态 0 失效 1 启用
 * @author : gull
 * @date : 2022/2/16 15:02
 */
public enum ProductStatusEnum {
    /**
     * 产品状态 0 失效 1 启用
     */
    PRODUCT_STATUS_ENABLE(1, "启用"),
    PRODUCT_STATUS_INVALID(0, "失效"),

    ;


    private final Integer code;
    private final String value;


    ProductStatusEnum(Integer code, String value) {
        this.code = code;
        this.value = value;
    }

    public static String getValue(Integer code) {
        for (ProductStatusEnum statusEnum : ProductStatusEnum.values()) {
            if (statusEnum.code.equals(code)) {
                return statusEnum.value;
            }
        }
        return "";
    }


    public Integer getCode() {
        return code;
    }

    public String getValue() {
        return value;
    }
}
